const router = require('koa-router')()
const auth = require('../middleware/jwt')
const StatController = require('../controller/stat')

router.prefix('/stat')

const controller = new StatController()

router.all('/sa.gif', controller.sagif.bind(controller))

router.get('/getPvLimit', auth, controller.getPvLimit.bind(controller))
router.get('/getIpVisitList', auth, controller.getIpVisitList.bind(controller))

router.get('/getIpList', auth, controller.getIpList.bind(controller))

router.get('/getErrorList', auth, controller.getErrorList.bind(controller))
router.get('/getRemainList', auth, controller.getRemainList.bind(controller))
router.get('/getClickList', auth, controller.getClickList.bind(controller))
router.get('/getLoadList', auth, controller.getLoadList.bind(controller))
router.get('/getResourceLoadList', auth, controller.getResourceLoadList.bind(controller))
router.get('/getHourGroup', auth, controller.getHourGroup.bind(controller))

module.exports = router
